import cx_Oracle
import argparse


parser=argparse.ArgumentParser(
            description = 'Generate connections to the oracle to have test listener data',
            epilog = 'Tested on windows')
parser.add_argument('-s','--server', required=True, help = 'Oracle connection string')
parser.add_argument('-c','--count', required=True, type=int,  help = 'Number of connections')

args=parser.parse_args()

print(args.server)

for i in range(args.count):
    print("{0}".format(i))
    conn = cx_Oracle.connect(args.server)

    #curs = conn.cursor()
    #curs.arraysize=50
    
    #curs.execute('select 2+2 "aaa" ,3*3 from dual')
    #print(curs.description)
    #print(curs.fetchone())
    
    conn.close()
